﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace My3DGame
{
    public class clsOverState : clsStateGame
    {
        private Texture2D ovew;
        Vector2 pos = new Vector2(0,0);

        public clsOverState(Game1 game1)
        {
        }

        public override void Initialize(My3DGame.Game1 game1)
        {
            base.Initialize(game1);
        }

        public override void LoadContent(Game1 game1)
        {
            ovew = game1.Content.Load<Texture2D>(@"2DImages\Over\OVer");

            base.LoadContent(game1);
        }

        public override void Update(Microsoft.Xna.Framework.GameTime gameTime, Game1 game1)
        {
            pos.X = game1.Window.ClientBounds.Width / 2 - ovew.Width / 2;
            pos.Y = game1.Window.ClientBounds.Height / 2 - ovew.Height / 2;
            base.Update(gameTime, game1);
        }

        public override void Draw(Microsoft.Xna.Framework.GameTime gameTime, Game1 game1)
        {
            game1.spriteBatch.Begin();

            // Vẽ about giữa màn hình.
            game1.spriteBatch.Draw(ovew, pos, Color.White);


            game1.spriteBatch.End();

            base.Draw(gameTime, game1);
        }
    }
}
